package com.lupan.classicsJava.jpa.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 说明：校园卡
 *
 * @author lupan
 * @version 2017/3/8 14:55
 */
@Entity
@Table(name = "SCHOOL_CARD")
public class SchoolCard extends BaseEntity{

    @Column(nullable = false)
    private String num;

    @OneToOne(mappedBy = "schoolCard",targetEntity = Student.class)
    private Student student;

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }
}
